import App from './App'

// #ifndef VUE3
import Vue from 'vue'

import store from '@/store'
import {
	router,
	RouterMount
} from '@/router'
Vue.use(router)

import global from "@/utils/global.js"
Vue.prototype.$global = global;

import uView from 'uview-ui'
Vue.use(uView)
uni.$u.config.unit = 'rpx'

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
    ...App
})

// #ifdef H5
RouterMount(app, router, '#app')
// #endif

// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif

// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif